package com.wlps.mapper;

import com.wlps.entity.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 角色表(sys_role) Mapper 接口
 * </p>
 *
 * @author ZWYZY
 * @since 2020-07-30
 */
@Repository
public interface SysRoleMapper extends BaseMapper<SysRole> {
    /**给用户增加角色
     * @param uid
     * @param rid
     * @return
     */
    boolean addRole(@Param(value = "uid") Long uid,@Param(value = "rid") Long rid);

    /**给已分配角色的用户更换角色
     * @param uid
     * @param rid
     * @return
     */
    boolean updateRole(@Param(value = "uid") Long uid,@Param(value = "rid") Long rid);
}
